<%@ page contentType="text/html;charset=UTF-8" language="java"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>

<fmt:setBundle basename="bundles.railroadOrderBundle" />

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="layout/jsc/changerowcolor.js"></script>
<script type="text/javascript" src="layout/jsc/rowclick.js"></script>
</head>

<body>

<H1 align="center"><fmt:message key="order.message"></fmt:message></H1>

<c:set var="routes" value="${sessionScope['routes'] }"></c:set>

<c:if test="${not empty routes}">
	<table id="route_table" width="50%" border="1" cellpadding="0"
		align="center" cellspacing="0">
		<thead>
			<tr>
				<th><fmt:message key="route.number"></fmt:message></th>
				<th><fmt:message key="route.name"></fmt:message></th>
				<th><fmt:message key="route.tickets"></fmt:message></th>
			</tr>
		</thead>

		<tbody>
			<c:forEach var="route" items="${routes}" varStatus="rowCounter">
				<tr onmouseover="ChangeColor(this, true);"
					onmouseout="ChangeColor(this, false);"
					onclick="onClick(${rowCounter.count},0,route_form,route_form.id_route);">
					<td><c:out value="${route.route_id}" /></td>
					<td><c:out value="${route.routeName}" /></td>
					<td><c:out value="${route.availableTicket}" /></td>
				</tr>
			</c:forEach>
		</tbody>
	</table>
</c:if>

<form id="route_form" method="get" action="/pages/station_list.do">
<input type="hidden" name="id_route" />
</form>

</body>

</html>